typedef
struct{
	//bool trace_valid;			//indicates if trace exists
	unsigned int trace_index;	//index into the first entry in trace
	unsigned int trace_legth;			//length of current trace
} trace_queue_entry_t;

class trace_queue {
	private:
		trace_queue_entry_t *tq;	// trace level queue
		unsigned int size;			// size of trace queue
		unsigned int head;			// head pointer
		unsigned int tail;			// tail pointer
		int length;					// number of instructions in trace queue

	public:
		trace_queue(unsigned int size);		// constructor
		void push(unsigned int trace_index, unsigned int trace_length);		// push an instruction (its payload buffer index) into the trace queue
		unsigned int pop_index();			// pop the current trace's index
		unsigned int pop_length();			// pop the current trace's length
		void pop();							// free an entry in trace queue
		void flush();						// flush the trace queue (make it empty)
		void copy(unsigned int block);		//to copy instructions from trace queue to issue queue
		bool trace_queue_empty();			// return if trace queue is empty
};
